const TOKEN_KEY = "ardai-msm-token";
const USER_KEY = "ardai-msm-user";

//获取token
export function getToken(){
    return window.localStorage.getItem(TOKEN_KEY);
}
//存储token
export function setToken(token){
    window.localStorage.setItem(TOKEN_KEY,token);
}
//获取用户信息
export function getUser(){
    return JSON.parse(window.localStorage.getItem(USER_KEY));
}
//存储用户
export function setUser(user){
    window.localStorage.setItem(USER_KEY,JSON.stringify(user));
}
//移除用户信息
export function removeToken(){
    window.localStorage.removeItem(TOKEN_KEY);
    window.localStorage.removeItem(USER_KEY);
}